package com.example.tijianserver.controller;

import com.example.tijianserver.mapper.DoctorMapper;
import com.example.tijianserver.pojo.Doctor;
import com.example.tijianserver.pojo.Users;
import com.example.tijianserver.response.ApiRestResponse;
import com.example.tijianserver.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController  // @Controller  +  @ResponseBody
@RequestMapping("/doctor")
public class DoctorController {
    @Autowired
    DoctorService doctorService;

    @RequestMapping("/login")
    public ApiRestResponse<Doctor> login(@RequestBody Doctor doctor){
        Doctor doctor1 = doctorService.login(doctor);

        return ApiRestResponse.success(doctor1);
    }

}
